package Lab02.test15;

import com.sun.org.apache.xpath.internal.SourceTree;

public class Graduate implements StudentInterface, TeacherInterface{
    //属性：name（姓名），sex（性别），age（年龄），fee（每学期学费） pay（月工资）。
    private String name;
    private String sex;
    private int age;
    private int fee;
    private int pay;
    //构造函数
    public Graduate(String name,int fee, int pay)
    {
        super();
        this.name = name;
        this.fee = fee;
        this.pay = pay;
        if (this.pay - this.fee < 20000)
            System.out.println("You  need a loan!");
            System.out.println("You income is enough！");
    }

    //行为：实现StudentInterface接口和TeacherInterface接口
    @Override
    public void setPay(int pay) {
        this.pay = pay;
    }

    @Override
    public int getPay() {
        return this.pay;
    }

    @Override
    public void setFee(int fee) {
        this.fee = fee;
    }

    @Override
    public int getFee() {
        return this.fee;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
}